﻿using System;
namespace Green.AgileMapper
{
    public interface ICodeGenerator
    {
        void ApplyAgileMapperTemplateStrategy(IAgileMapperTemplateStrategy strategy);

        /// <summary>
        /// 代码生成策略
        /// </summary>
        IAgileMapperTemplateStrategy AgileMapperTemplateStrategy { get; }

        /// <summary>
        /// 代码生成
        /// </summary>
        /// <param name="fromObj"></param>
        /// <returns></returns>
        string CodeGenerator(Type FromType, Type toType, object fromObj);

        /// <summary>
        /// 代码生成,From Type必须new();
        /// </summary>
        /// <returns></returns>
        string CodeGenerator(Type FromType, Type toType);
    }
}
